using System;
using System.Collections.Generic;
using System.Text;

namespace MeetFuture.MRC
{
    public enum LotStatus
    {
        Lot_Initialization = 1,
        Lot_JobPrepared = 2,
        Lot_JobPreparedCancel = 4,
        Lot_OnRack = 8,
        Lot_LeftRack = 16,
        Lot_PDSend = 32,
        Lot_PickUpSend = 64,
        Lot_DropOffSend = 128,
        Lot_OnAGV = 256,
        Lot_OnTool = 512,
        Lot_JOR = 1024,
        Lot_UnlockOK = 2048,
        Lot_CheckOK = 4096,
        Lot_Error = 32768
    }

	public partial class clsLotInfo
	{
        private const string key_split = ",";

        private DateTime _StartTime = DateTime.MinValue;
        private DateTime _EndTime = DateTime.MinValue;

        private string _TransId = string.Empty;
        private int _OrderIndex = -1;
        private LotStatus _Status = LotStatus.Lot_Initialization;
        private string _RackID = string.Empty;
        private clsRackPosition _RackPosition = null;
        private string _eqpport = string.Empty;
        /// <summary>
        /// Lot Object Parameter for MR
        /// </summary>     
        private string _Mission = string.Empty;
        private string _AGV = string.Empty;
        private string _Src = string.Empty;
        private string _Des = string.Empty;
        /// <summary>
        /// Lot Object Parameters from MES
        /// </summary>
        private string _eqp = string.Empty;
        private string _operator = string.Empty;
        private string _batch = string.Empty;
        private string _batchsize = string.Empty;
        private string _lotid = string.Empty;
        private string _casid = string.Empty;
        private string _lottype = string.Empty;
        private string _ismonitor = string.Empty;
        private string _qty = string.Empty;
        private string _ppid = string.Empty;
        private string _parameter = string.Empty;
        private string _reticle = string.Empty;
        private string _proc = string.Empty;
        private string _part = string.Empty;
        private string _loc = string.Empty;
        private string _nloc = string.Empty;
        private string _nstg = string.Empty;
        private string _stg = string.Empty;
        private string _stus = string.Empty;
        private string _capa = string.Empty;
        private string _pri = string.Empty;
        private string _rcp = string.Empty;
        private string _stepid = string.Empty;
        private string _due = string.Empty;
        private string _cln = string.Empty;
        private string _cmt = string.Empty;
        private string _mode = string.Empty;
        private string _recipe_parameter = string.Empty;

        private bool _IsJobPrepare = false;
        private bool _IsOnRack = false;
        private bool _IsJOR = false;
        private bool _IsSendPD = false;
        private bool _IsSendPickUp = false;
        private bool _IsSendDropOff = false;
        private bool _IsOnAGV = false;
        private bool _IsOnTool = false;
        private bool _IsError = false;
        private bool _IsLotCheckOK = false;
        private bool _IsUnlocked = false;

        public clsLotInfo(string LotID)
        {
            this._lotid = LotID;
            this._TransId = string.Empty;
            this._OrderIndex = -1;
            this._Status = LotStatus.Lot_Initialization;
            this._RackID = string.Empty;
            this._RackPosition = null;
            this._eqpport = string.Empty;
            this._Mission = string.Empty;
            this._AGV = string.Empty;
            this._Src = string.Empty;
            this._Des = string.Empty;
            this._eqp = string.Empty;
            this._operator = string.Empty;
            this._batchsize = string.Empty;
            this._casid = string.Empty;
            this._lottype = string.Empty;
            this._ismonitor = string.Empty;
            this._qty = string.Empty;
            this._ppid = string.Empty;
            this._parameter = string.Empty;
            this._reticle = string.Empty;
            this._proc = string.Empty;
            this._part = string.Empty;
            this._loc = string.Empty;
            this._nloc = string.Empty;
            this._nstg = string.Empty;
            this._stg = string.Empty;
            this._stus = string.Empty;
            this._capa = string.Empty;
            this._pri = string.Empty;
            this._rcp = string.Empty;
            this._stepid = string.Empty;
            this._due = string.Empty;
            this._cln = string.Empty;
            this._cmt = string.Empty;
            this._mode = string.Empty;
            this._recipe_parameter = string.Empty;
            this._IsJobPrepare = false;
            this._IsOnRack = false;
            this._IsJOR = false;
            this._IsSendPD = false;
            this._IsSendPickUp = false;
            this._IsSendDropOff = false;
            this._IsOnAGV = false;
            this._IsOnTool = false;
            this._IsError = false;
            this._IsLotCheckOK = false;
            this._IsUnlocked = false;
        }
        public string LotID
        {
            get { return this._lotid; }
        }
        public string Batch
        {
            get { return this._batch; }
            set { this._batch = value; }
        }
        public int OrderIndex
        {
            get { return this._OrderIndex; }
            set { this._OrderIndex = value; }
        }
        public string RackID
        {
            get { return this._RackID; }
            set { this._RackID = value; }
        }
        public clsRackPosition RackPosition
        {
            get { return this._RackPosition; }
            set { this._RackPosition = value; }
        }
        public string Mission
        {
            get { return this._Mission; }
            set { this._Mission = value; }
        }
        public string AGV
        {
            get { return this._AGV; }
            set { this._AGV = value; }
        }
        public string Src
        {
            get { return this._Src; }
            set { this._Src = value; }
        }
        public string Des
        {
            get { return this._Des; }
            set { this._Des = value; }
        }
        public string TransID
        {
            get { return this._TransId; }
            set { this._TransId = value; }
        }        
        public string EQP
        {
            get { return this._eqp; }
            set { this._eqp = value; }
        }
        public string EQP_Port
        {
            get { return this._eqpport; }
            set { this._eqpport = value; }
        }
        public DateTime StartTime
        {
            get { return this._StartTime; }
            set { this._StartTime = value; }
        }
        public DateTime EndTime
        {
            get { return this._EndTime; }
            set { this._EndTime = value; }
        }
        public string AGV_EQPPort
        {
            get
            {
                string result = string.Empty;
                try
                {
                    result += this._eqp + "_1_";
                    switch (this._eqpport)
                    {
                        case "1":
                        case "2":
                    	{
                            result += "1" + "@" + this._eqpport;
                    		break;
                    	}
                        case "3":
                        {
                            result += "2" + "@1";
                            break;
                        }
                        case "4":
                        {
                            result += "2" + "@2";
                            break;
                        }
                    	default :
                    	{
                    		break;
                    	}
                    }
                }
                catch (System.Exception ex)
                {	
                }
                return result;
            }
        }
        public string Operator
        {
            get { return this._operator; }
            set { this._operator = value; }
        }
        public string BatchSize
        {
            get { return this._batchsize; }
            set { this._batchsize = value; }
        }
        public string CasID
        {
            get { return this._casid; }
            set { this._casid = value; }
        }
        public string LotType
        {
            get { return this._lottype; }
            set { this._lottype = value; }
        }
        public string IsMonitor
        {
            get { return this._ismonitor; }
            set { this._ismonitor = value; }
        }
        public string Qty
        {
            get 
            { 
                if (string.IsNullOrEmpty(this._qty))
                {
                    this._qty = "25";
                }
                return this._qty; 
            }
            set { this._qty = value; }
        }
        public string PPID
        {
            get { return this._ppid; }
            set { this._ppid = value; }
        }
        public string Parameter
        {
            get { return this._parameter; }
            set { this._parameter = value; }
        }
        public string Reticle
        {
            get { return this._reticle; }
            set { this._reticle = value; }
        }
        public string Proc
        {
            get { return this._proc; }
            set { this._proc = value; }
        }
        public string Part
        {
            get { return this._part; }
            set { this._part = value; }
        }
        public string Loc
        {
            get { return this._loc; }
            set { this._loc = value; }
        }
        public string NLoc
        {
            get { return this._nloc; }
            set { this._nloc = value; }
        }
        public string Stg
        {
            get { return this._stg; }
            set { this._stg = value; }
        }
        public string NStg
        {
            get { return this._nstg; }
            set { this._nstg = value; }
        }
        public string Stus
        {
            get { return this._stus; }
            set { this._stus = value; }
        }
        public string Capa
        {
            get { return this._capa; }
            set { this._capa = value; }
        }
        public string Pri
        {
            get { return this._pri; }
            set { this._pri = value; }
        }
        public string Rcp
        {
            get { return this._rcp; }
            set { this._rcp = value; }
        }
        public string StepID
        {
            get { return this._stepid; }
            set { this._stepid = value; }
        }
        public string DueDate
        {
            get { return this._due; }
            set { this._due = value; }
        }
        public string CleanDate
        {
            get { return this._cln; }
            set { this._cln = value; }
        }
        public string Mode
        {
            get { return this._mode; }
            set { this._mode = value; }
        }
        public string Recipe_Parameter
        {
            get { return this._recipe_parameter; }
            set { this._recipe_parameter = value; }
        }
        public string Comments
        {
            get { return this._cmt.Replace(ApplicationGlobal.Cr, " ").Replace(ApplicationGlobal.Lf, " "); }
            set { this._cmt = value.Replace(ApplicationGlobal.Cr, " ").Replace(ApplicationGlobal.Lf, " "); }
        }        
        public LotStatus Status
        {
            get { return this._Status; }
            set
            {
                this._Status = this._Status | value;
                switch (value)
                {
                    case LotStatus.Lot_Initialization:
                    {
                        this._Status = 0;
                        this._Status = LotStatus.Lot_Initialization;
                        this._IsError = false;
                        this._IsJobPrepare = false;
                        this._IsJOR = false;
                        this._IsOnAGV = false;
                        this._IsOnRack = false;
                        this._IsOnTool = false;
                        this._IsSendPD = false;
                        this._IsSendPickUp = false;
                        this._IsSendDropOff = false;
                        this._IsLotCheckOK = false;
                        this._IsUnlocked = false;
                        this._cmt = string.Empty;
                        this._OrderIndex = -1;
                        this._eqp = string.Empty;
                        this._eqpport = string.Empty;
                        this._AGV = string.Empty;
                        this._Mission = string.Empty;
                        this._RackID = string.Empty;
                        this._RackPosition = null;
                        break;
                    }
                    case LotStatus.Lot_JobPrepared:
                	{
                        this._IsJobPrepare = true;
                        this._IsOnAGV = false;
                        this._IsOnTool = false;
                        this._IsSendPD = false;
                        this._IsSendPickUp = false;
                        this._IsSendDropOff = false;
                		break;
                	}
                    case LotStatus.Lot_JobPreparedCancel:
                	{
                        this._IsJobPrepare = false;
                        this._eqp = string.Empty;
                        this._eqpport = string.Empty;
                		break;
                	}
                    case LotStatus.Lot_OnRack:
                	{
                        this._IsOnRack = true;
                        this._IsOnAGV = false;
                        this._IsOnTool = false;
                        this._IsSendPD = false;
                        this._IsSendPickUp = false;
                        this._IsSendDropOff = false;
                		break;
                	}
                    case LotStatus.Lot_LeftRack:
                	{
                        this._IsOnRack = false;
                        this._RackID = string.Empty;
                        this._RackPosition = null;
                		break;
                	}
                    case LotStatus.Lot_JOR:
                	{
                        this._IsJOR = true;
                        this._IsJobPrepare = false;
                        this._IsOnRack = false;
                        this._IsSendPD = false;
                        this._IsSendPickUp = false;
                        this._IsSendDropOff = false;
                        this._AGV = string.Empty;
                        this._RackID = string.Empty;
                        this._RackPosition = null;
                		break;
                	}
                    case LotStatus.Lot_PDSend:
                	{
                        this._IsSendPD = true;
                		break;
                	}
                    case LotStatus.Lot_PickUpSend:
                	{
                        this._IsSendPickUp = true;
                        this._IsSendPD = true;
                		break;
                	}
                    case LotStatus.Lot_DropOffSend:
                	{
                        this._IsSendDropOff = true;
                        this._IsSendPD = true;
                		break;
                	}
                    case LotStatus.Lot_OnAGV:
                	{
                        this._IsOnAGV = true;
                        this._IsOnRack = false;
                        this._IsOnTool = false;
                		break;
                	}
                    case LotStatus.Lot_OnTool:
                	{
                        this._IsOnTool = true;
                        this._IsOnAGV = false;
                        this._IsOnRack = false;
                        this._IsSendPD = false;
                        this._IsSendPickUp = false;
                        this._IsSendDropOff = false;
                		break;
                	}
                    case LotStatus.Lot_CheckOK:
                	{
                        this._IsLotCheckOK = true;
                		break;
                	}
                    case LotStatus.Lot_Error:
                	{
                        this._IsError = true;
                        this._IsJobPrepare = false;
                        this._IsJOR = false;
                        this._IsOnAGV = false;
                        this._IsOnRack = false;
                        this._IsOnTool = false;
                        this._IsSendPD = false;
                        this._IsSendPickUp = false;
                        this._IsSendDropOff = false;
                        this._IsLotCheckOK = false;
                		break;
                	}
                    case LotStatus.Lot_UnlockOK:
                    {
                        this._IsOnTool = true;
                        this._IsUnlocked = true;
                        this._IsOnRack = false;                        
                        break;
                    }
                	default :
                	{
                        if ((this._Status & LotStatus.Lot_JobPrepared) == LotStatus.Lot_JobPrepared)
                        {
                            this._IsJobPrepare = true;
                            this._IsOnAGV = false;
                            this._IsOnTool = false;
                            this._IsSendPD = false;
                            this._IsSendPickUp = false;
                            this._IsSendDropOff = false;
                        }
                        if ((this._Status & LotStatus.Lot_JobPreparedCancel) == LotStatus.Lot_JobPreparedCancel)
                        {
                            this._IsJobPrepare = false;
                            this._eqp = string.Empty;
                            this._eqpport = string.Empty;
                        }
                        if ((this._Status & LotStatus.Lot_OnRack) == LotStatus.Lot_OnRack)
                        {
                            this._IsOnRack = true;
                            this._IsOnAGV = false;
                            this._IsOnTool = false;
                            this._IsSendPD = false;
                            this._IsSendPickUp = false;
                            this._IsSendDropOff = false;
                        }
                        if ((this._Status & LotStatus.Lot_LeftRack) == LotStatus.Lot_LeftRack)
                        {
                            this._IsOnRack = false;
                            this._RackID = string.Empty;
                            this._RackPosition = null;
                        }
                        if ((this._Status & LotStatus.Lot_JOR) == LotStatus.Lot_JOR)
                        {
                            this._IsJOR = true;
                            this._IsJobPrepare = false;
                            this._IsOnRack = false;
                            this._IsSendPD = false;
                            this._IsSendPickUp = false;
                            this._IsSendDropOff = false;
                            this._AGV = string.Empty;
                            this._RackID = string.Empty;
                            this._RackPosition = null;
                        }
                        if ((this._Status & LotStatus.Lot_PDSend) == LotStatus.Lot_PDSend)
                        {
                            this._IsSendPD = true;
                        }
                        if ((this._Status & LotStatus.Lot_PickUpSend) == LotStatus.Lot_PickUpSend)
                        {
                            this._IsSendPickUp = true;
                            this._IsSendPD = true;
                        }
                        if ((this._Status & LotStatus.Lot_DropOffSend) == LotStatus.Lot_DropOffSend)
                        {
                            this._IsSendDropOff = true;
                            this._IsSendPD = true;
                        }
                        if ((this._Status & LotStatus.Lot_OnAGV) == LotStatus.Lot_OnAGV)
                        {
                            this._IsOnAGV = true;
                            this._IsOnRack = false;
                            this._IsOnTool = false;
                        }
                        if ((this._Status & LotStatus.Lot_OnTool) == LotStatus.Lot_OnTool)
                        {
                            this._IsOnTool = true;
                            this._IsOnAGV = false;
                            this._IsOnRack = false;
                            this._IsSendPD = false;
                            this._IsSendPickUp = false;
                            this._IsSendDropOff = false;
                        }
                        if ((this._Status & LotStatus.Lot_CheckOK) == LotStatus.Lot_CheckOK)
                        {
                            this._IsLotCheckOK = true;
                        }
                        if ((this._Status & LotStatus.Lot_Error) == LotStatus.Lot_Error)
                        {
                            this._IsError = true;
                            this._IsJobPrepare = false;
                            this._IsJOR = false;
                            this._IsOnAGV = false;
                            this._IsOnRack = false;
                            this._IsOnTool = false;
                            this._IsSendPD = false;
                            this._IsSendPickUp = false;
                            this._IsSendDropOff = false;
                            this._IsLotCheckOK = false;
                        }
                        if ((this._Status & LotStatus.Lot_UnlockOK) == LotStatus.Lot_UnlockOK)
                        {
                            this._IsOnTool = true;
                            this._IsUnlocked = true;
                            this._IsOnRack = false;        
                        }
                		break;
                	}
                }
            }
        }
        public bool IsJobPrepare
        {
            get { return this._IsJobPrepare; }            
        }
        public bool IsOnRack
        {
            get { return this._IsOnRack; }            
        }
        public bool IsJOR
        {
            get { return this._IsJOR; }
        }
        public bool IsSendPD
        {
            get { return this._IsSendPD; }
        }
        public bool IsSendPickUp
        {
            get { return this._IsSendPickUp; }
        }
        public bool IsSendDropOff
        {
            get { return this._IsSendDropOff; }
        }
        public bool IsOnAGV
        {
            get { return this._IsOnAGV; }
        }
        public bool IsOnTool
        {
            get { return this._IsOnTool; }
        }
        public bool IsError
        {
            get { return this._IsError; }
        }
        public bool IsLotCheckOK
        {
            get { return this._IsLotCheckOK; }
        }
        public bool IsUnlocked
        {
            get { return this._IsUnlocked; }
        }
        public string ToObjectString()
        {
            string result = string.Empty;
            try
            {
                
            }
            catch (System.Exception ex)
            {
            }
            return result;
        }
        private string GetLotStatus()
        {
            string result = string.Empty;
            try
            {
                if (this._IsError)
                {
                    result = "4";
                    return result;
                }
            	if (this._IsJobPrepare & this._IsOnRack)
            	{
                    result = "5";
                    return result;
            	}
                if (this._IsJobPrepare)
                {
                    result = "2";
                    return result;
                }
                if (this._IsOnRack)
                {
                    result = "3";
                    return result;
                }
            }
            catch (System.Exception ex)
            {	
            }
            return result;
        }        
        public clsLotInfo CopyLot()
        {
            clsLotInfo result = new clsLotInfo(this._lotid);
            try
            {
                result.TransID = this._TransId;
                result.OrderIndex = this._OrderIndex;
                result.Status = this._Status;
                result.RackID = this._RackID;
                result.RackPosition = this._RackPosition;
                result.EQP_Port = this._eqpport;
                result.Mission = this._Mission;
                result.AGV = this._AGV;
                result.Src = this._Src;
                result.Des = this._Des;
                result.EQP = this._eqp;
                result.Operator = this._operator;
                result.BatchSize = this._batchsize;
                result.CasID = this._casid;
                result.LotType = this._lottype;
                result.IsMonitor = this._ismonitor;
                result.Qty = this._qty;
                result.PPID = this._ppid;
                result.Parameter = this._parameter;
                result.Reticle = this._reticle;
                result.Proc = this._proc;
                result.Part = this._part;
                result.Loc = this._loc;
                result.NLoc = this._nloc;
                result.NStg = this._nstg;
                result.Stg = this._stg;
                result.Stus = this._stus;
                result.Capa = this._capa;
                result.Pri = this._pri;
                result.Rcp = this._rcp;
                result.StepID = this._stepid;
                result.DueDate = this._due;
                result.CleanDate = this._cln;
                result.Comments = this._cmt;
                result.Mode = this._mode;
                result.Recipe_Parameter = this._recipe_parameter;
                result.StartTime = this._StartTime;
                result.EndTime = this._EndTime;
            }
            catch (System.Exception ex)
            {
            }
            return result;
        }

        public void UpdateLotInfo(clsLotInfo LotInfo)
        {
            try
            {
                if ((!string.IsNullOrEmpty(LotInfo.TransID)) && (string.IsNullOrEmpty(this._TransId)))
                {
                    this._TransId = LotInfo.TransID;
                }
                if ((!string.IsNullOrEmpty(LotInfo.RackID)) && (string.IsNullOrEmpty(this._RackID)))
                {
                    this._RackID = LotInfo.RackID;                    
                }
                if ((LotInfo.RackPosition != null) && (this._RackPosition == null))
                {
                    this._RackPosition = LotInfo.RackPosition;
                }
                if ((!string.IsNullOrEmpty(LotInfo.EQP_Port)) && (string.IsNullOrEmpty(this._eqpport)))
                {
                    this._eqpport = LotInfo.EQP_Port;                    
                }
                if ((!string.IsNullOrEmpty(LotInfo.Mission)) && (string.IsNullOrEmpty(this._Mission)))
                {
                    this._Mission = LotInfo.Mission;                    
                }
                if ((!string.IsNullOrEmpty(LotInfo.AGV)) && (string.IsNullOrEmpty(this._AGV)))
                {
                    this._AGV = LotInfo.AGV;
                }
                if ((!string.IsNullOrEmpty(LotInfo.Src)) && (string.IsNullOrEmpty(this._Src)))
                {
                    this._Src = LotInfo.Src;
                }
                if ((!string.IsNullOrEmpty(LotInfo.Des)) && (string.IsNullOrEmpty(this._Des)))
                {
                    this._Des = LotInfo.Des;
                }
                if ((!string.IsNullOrEmpty(LotInfo.EQP)) && (string.IsNullOrEmpty(this._eqp)))
                {
                    this._eqp = LotInfo.EQP;
                }
                if ((!string.IsNullOrEmpty(LotInfo.Operator)) && (string.IsNullOrEmpty(this._operator)))
                {
                    this._operator = LotInfo.Operator;
                }
                if ((!string.IsNullOrEmpty(LotInfo.BatchSize)) && (string.IsNullOrEmpty(this._batchsize)))
                {
                    this._batchsize = LotInfo.BatchSize;
                }
                if ((!string.IsNullOrEmpty(LotInfo.CasID)) && (string.IsNullOrEmpty(this._casid)))
                {
                    this._casid = LotInfo.CasID;
                }
                if ((!string.IsNullOrEmpty(LotInfo.LotType)) && (string.IsNullOrEmpty(this._lottype)))
                {
                    this._lottype = LotInfo.LotType;
                }
                if ((!string.IsNullOrEmpty(LotInfo.IsMonitor)) && (string.IsNullOrEmpty(this._ismonitor)))
                {
                    this._ismonitor = LotInfo.IsMonitor;
                }
                if ((!string.IsNullOrEmpty(LotInfo.Qty)) && (string.IsNullOrEmpty(this._qty)))
                {
                    this._qty = LotInfo.Qty;
                }
                if ((!string.IsNullOrEmpty(LotInfo.PPID)) && (string.IsNullOrEmpty(this._ppid)))
                {
                    this._ppid = LotInfo.PPID;
                }
                if ((!string.IsNullOrEmpty(LotInfo.Parameter)) && (string.IsNullOrEmpty(this._parameter)))
                {
                    this._parameter = LotInfo.Parameter;
                }
                if ((!string.IsNullOrEmpty(LotInfo.Reticle)) && (string.IsNullOrEmpty(this._reticle)))
                {
                    this._reticle = LotInfo.Reticle;
                }
                if ((!string.IsNullOrEmpty(LotInfo.Proc)) && (string.IsNullOrEmpty(this._proc)))
                {
                    this._proc = LotInfo.Proc;
                }
                if ((!string.IsNullOrEmpty(LotInfo.Part)) && (string.IsNullOrEmpty(this._part)))
                {
                    this._part = LotInfo.Part;
                }
                if ((!string.IsNullOrEmpty(LotInfo.Loc)) && (string.IsNullOrEmpty(this._loc)))
                {
                    this._loc = LotInfo.Loc;                    
                }
                if ((!string.IsNullOrEmpty(LotInfo.NLoc)) && (string.IsNullOrEmpty(this._nloc)))
                {
                    this._nloc = LotInfo.NLoc;
                }
                if ((!string.IsNullOrEmpty(LotInfo.NStg)) && (string.IsNullOrEmpty(this._nstg)))
                {
                    this._nstg = LotInfo.NStg;                    
                }
                if ((!string.IsNullOrEmpty(LotInfo.Stg)) && (string.IsNullOrEmpty(this._stg)))
                {
                    this._stg = LotInfo.Stg;
                }
                if ((!string.IsNullOrEmpty(LotInfo.Stus)) && (string.IsNullOrEmpty(this._stus)))
                {
                    this._stus = LotInfo.Stus;
                }
                if ((!string.IsNullOrEmpty(LotInfo.Capa)) && (string.IsNullOrEmpty(this._capa)))
                {
                    this._capa = LotInfo.Capa;
                }
                if ((!string.IsNullOrEmpty(LotInfo.Pri)) && (string.IsNullOrEmpty(this._pri)))
                {
                    this._pri = LotInfo.Pri;
                }
                if ((!string.IsNullOrEmpty(LotInfo.Rcp)) && (string.IsNullOrEmpty(this._rcp)))
                {
                    this._rcp = LotInfo.Rcp;
                }
                if ((!string.IsNullOrEmpty(LotInfo.StepID)) && (string.IsNullOrEmpty(this._stepid)))
                {
                    this._stepid = LotInfo.StepID;
                }
                if ((!string.IsNullOrEmpty(LotInfo.DueDate)) && (string.IsNullOrEmpty(this._due)))
                {
                    this._due = LotInfo.DueDate;
                }
                if ((!string.IsNullOrEmpty(LotInfo.CleanDate)) && (string.IsNullOrEmpty(this._cln)))
                {
                    this._cln = LotInfo.CleanDate;
                }
                if ((!string.IsNullOrEmpty(LotInfo.Comments)) && (string.IsNullOrEmpty(this._cmt)))
                {
                    this._cmt = LotInfo.Comments;
                }
                if ((!string.IsNullOrEmpty(LotInfo.Mode)) && (string.IsNullOrEmpty(this._mode)))
                {
                    this._mode = LotInfo.Mode;                    
                }
                if ((!string.IsNullOrEmpty(LotInfo.Recipe_Parameter)) && (string.IsNullOrEmpty(this._recipe_parameter)))
                {
                    this._recipe_parameter = LotInfo.Recipe_Parameter;
                }
                this._StartTime = LotInfo.StartTime;
                this._EndTime = LotInfo.EndTime;
            }
            catch (System.Exception ex)
            {	
            }
        }
 
	}
}
